#![allow(unused)] // For beginning only.

use anyhow::Result;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<()> {
    let hc = httpc_test::new_client("http://localhost:5678")?;

    // hc.do_get("/index.html").await?.print().await?;

    let req_login = hc.do_post(
        "/api/login",
        json!(
        {
            "payload":{
                "username": "demo1",
                "pwd": "welcome"
            },
            "type":"Json"
        }),
    );
    req_login.await?.print().await?;

    Ok(())
}
